﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="demo.aspx.cs" Inherits="RiskMonitor.Web.DemoSwfUpload.New.demo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="default.css" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript" src="swfupload.js"></script>

    <script type="text/javascript" src="swfupload.queue.js"></script>

    <script type="text/javascript" src="fileprogress.js"></script>

    <script type="text/javascript" src="handlers.js"></script>

    <script type="text/javascript">
        var upload1, upload2;

        window.onload = function() {
            upload1 = new SWFUpload({
                // Backend Settings
                upload_url: "../upload.ashx",
                post_params: { "PHPSESSID": "q9mh33nce84cn96pb8p7238hl2" },

                // File Upload Settings
                file_size_limit: "502400", // 100MB
                file_types: "*.*",
                file_types_description: "All Files",
                file_upload_limit: "10",
                file_queue_limit: "0",

                // Event Handler Settings (all my handlers are in the Handler.js file)
                file_dialog_start_handler: fileDialogStart,
                file_queued_handler: fileQueued,
                file_queue_error_handler: fileQueueError,
                file_dialog_complete_handler: fileDialogComplete,
                upload_start_handler: uploadStart,
                upload_progress_handler: uploadProgress,
                upload_error_handler: uploadError,
                upload_success_handler: uploadSuccess,
                upload_complete_handler: uploadComplete,

                // Button Settings
                button_image_url: "XPButtonUploadText_61x22.png",
                button_placeholder_id: "spanButtonPlaceholder1",
                button_width: 61,
                button_height: 22,

                // Flash Settings
                flash_url: "swfupload.swf",


                custom_settings: {
                    progressTarget: "fsUploadProgress1",
                    cancelButtonId: "btnCancel1"
                },

                // Debug Settings
                debug: false
            });

        }

    </script>

</head>
<body>
    <div id="content">
        <h2>
            Multi-Instance Demo</h2>
        <p>
            This page demonstrates how multiple instances of SWFUpload can be loaded on the
            same page. It also demonstrates the use of the graceful degradation plugin and the
            queue plugin.</p>
        <table>
            <tr valign="top">
                <td>
                    <div>
                        <span class="fieldset flash" id="fsUploadProgress1">
                            
                        </span>
                        <span style="padding-left: 5px;">
                            <span id="spanButtonPlaceholder1"></span>
                            <input id="btnCancel1" type="button" value="Cancel Uploads" onclick="cancelQueue(upload1);"
                                disabled="disabled" style="margin-left: 2px; height: 22px; font-size: 8pt;" />
                            <br />
                        </span>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</body>
</html>
